﻿using System;
using System.Collections.Generic;
using HiTeachers.Entities;
using HiTeachers.Services;

namespace HiTeachers.Web
{
    public partial class ContactedPost : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            IList<ContactedRequest> contactedRequests = ContactedRequestServices.GetContactedRequests(CurrentUser.ID);

            if (contactedRequests != null && contactedRequests.Count > 0)
            {
                ltrNotFound.Visible = false;
                rptContactedPost.Visible = true;
                rptContactedPost.DataSource = contactedRequests;
                rptContactedPost.DataBind();
            }
            else
            {
                ltrNotFound.Visible = true;
                rptContactedPost.Visible = false;
                ltrNotFound.Text = "<dd class=\"cc_rowOdd\"><p align=\"center\"><strong>Bạn chưa liên hệ với học viên nào.</strong></p></dd>";
            }
        }
    }
}
